Faster non-destructive list sorting
authorMattias Engdegård <mattiase@acm.org>
Fri, 22 Mar 2024 10:54:09 +0000 (11:54 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 29 Mar 2024 10:39:38 +0000 (11:39 +0100)
commit45941a62c799f9685fae296079304ae0898920cc
treecfe060f171b70752334b0ff2306fadeff1ec6754
parentdeae311281522864ebabaf56adafbe37032cc8a9
Faster non-destructive list sorting

Postpone the creation of a new list to after sorting which turns out to
be a lot faster (1.1x - 1.5x speedup).

* src/fns.c (sort_list, sort_vector, Fsort):
Create the new list when moving the data out from the temporary array.
src/fns.c